<template>
  <div>
    这是B组件
  </div>
</template>
<script>
import { findComponentUpward, findComponentsUpwards } from '../utils/assist'
export default {
  name: 'compB',
  mounted(){
    // const parent = findComponentUpward(this, 'comp')
    // if(parent){
    //   // console.log(parent.msg)
    //   // parent.thisMethod()
    // }
    const parents = findComponentsUpwards(this, 'comp')
    if(parents){
      // console.log(parents, 'parent')
    }
  }
};
</script>